﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Content;

namespace XDLPipeline
{
    /// <summary>
    /// Helper class to serialize WeaponSettings XML definition.
    /// </summary>
    public class WeaponSettingsContent
    {
        /// <summary>
        /// Friendly weapon name
        /// </summary>
        public string Name;

        /// <summary>
        /// Basic damage
        /// </summary>
        public int Damage;

        /// <summary>
        /// Reload time
        /// </summary>
        [ContentSerializer(Optional = true)]
        public float ReloadTime = 0;

        /// <summary>
        /// Indentifies damage type, up to each game to define the valid set of values
        /// </summary>
        [ContentSerializer(Optional = true)]
        public int DamageType = 0;

        /// <summary>
        /// Indicates whether the weapon can be fired continously (or not)
        /// </summary>
        [ContentSerializer(Optional = true)]
        public bool ContinousFire = false;

        /// <summary>
        /// Recoil force
        /// </summary>
        /// <remarks>
        /// Not a vector as recoil force is a scalar to be multiplied with the weapon direction.
        /// </remarks>
        [ContentSerializer(Optional = true)]
        public float RecoilForce = 0;

        [ContentSerializer(Optional = true)]
        public float Radius = 0;

        /// <summary>
        /// Fire animation duration (optional)
        /// </summary>
        [ContentSerializer(Optional = true)]
        public TimeSpan FireAnimationDuration = TimeSpan.Zero; 
    }
}
